ARCH_MACH = $(shell uname -m)
OS_TYPE   = $(shell uname -s)

########################################################################
##########        Linux Cluster Environment                   ##########
########################################################################

CCC = g++



INCLUDE :=  -I../../include/levmar-2.3 -I../../include/optpp-2.4
############### options for preprocessor (include directories)
#
CPPFLAGS	:=	$(CPPFLAGS)  -D__LINUX__ -DEBUG  -DHAVE_NAMESPACES	-g -O2 -w  -static

COMPILE.cc	=  $(CCC) $(CPPFLAGS)  -c $(INCLUDE) 
LINK.cc		=  $(CCC) $(CPPFLAGS)  

		    
###############	make targets
#
all: potfitting

	
############### to generate potFitting
OBJS_potFitting = 	m_potFitting.o  Individual.o   Potential.o PotHF.o PotFitter.o PotWater.o
TARGET_potFitting = ../../potFitting
LDLIBS_potFitting = -L../../lib -llevmar -llapack -lgfortran -lopt -lnewmat -lblas

potfitting:			$(TARGET_potFitting) 
$(TARGET_potFitting): $(OBJS_potFitting)
		$(LINK.cc) -o $@ $(OBJS_potFitting) $(LDLIBS_potFitting)	
					

####################### Automated parts
.cc:
		$(LINK.cc) -o $@ $< $(LDLIBS)
.cc.o:
		$(COMPILE.cc) -o $@ $<


############### suffixes list
#
.SUFFIXES:	.cc

.PHONY:		all potfitting clean depend lib



###############	clean up
#
clean:
	-$(RM) $(OBJS_potFitting)

###############	update dependencies
#
depend:
		makedepend -Y -- $(CPPFLAGS) *.c *.cc *.cpp 2> /dev/null

cleandepend:
		makedepend

# DO NOT DELETE
